using System;
using System.Collections.Generic;
using System.Text;

using Pampa.CRUD.Core;
using Castle.ActiveRecord;

namespace Demo.Model
{
    [ActiveRecord]
    public class Hobby : AbstractActiveRecord<Hobby>, IIdDescription 
    {
        private int id;
        private string description;

        [PrimaryKey]
        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        [Property]
        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        string IIdDescription.Id
        {
            get { return id.ToString(); }
        }

        public static int ParseId(string strID)
        {
            return int.Parse(strID);
        }
    }
}
